export const formComponentConfig = {
  selectLike: () =>
    import('@/views/supplier/components/formComp/selectLike.vue'),
  // inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
  // typeModule: () =>
  //   import('@/views/resourceBalanceManagement/formComp/typeModel.vue'),
  dictSelect: () =>
    import(
      '@/views/basic-configuration/components/formCompinents/dictSelect.vue'
    ),
  inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
  searchItemUser: () => import('@/common/components/search-modal/user.vue'),
  categoryName: () =>
    import('@/common/components/search-modal/categoryName.vue'),
  yearPicker: () =>
    import(
      '@/views/basic-configuration/systemPeriodMaintenance/yearPicker.vue'
    ),
};
export const renderKeys = [
  'materialCode',
  'materialName',
  'materialType',
  'materialStatus',
  'keyAttributes',
  'categoryLv',
  'figureNumber',
  'modelMark',
  'createTime',
  'updateTime',
  'updater',
  'parentModel',
  'itemCode',
  'isContainsSensitiveInformation',
  'supplierCode',
  'supplierName',
];
// 物料号 关键物料属性 品类

export const formRenderConfig: any = {
  materialCode: {
    label: '物料编码',
    field: 'materialCode',
    componentName: 'inputModal',
    componentProps: {
      tltle: '物料编码',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },
  materialName: {
    label: '物料名称',
    field: 'materialName',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入物料名称',
    },
  },
  materialType: {
    label: '物料类型',
    field: 'materialType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'mdsType',
      placeholder: '请输入物料类型',
    },
  },
  materialStatus: {
    label: '物料状态',
    field: 'materialStatus',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'materialStatus',
      placeholder: '请输入物料状态',
    },
  },
  keyAttributes: {
    label: '物料关键属性',
    field: 'keyAttributes',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入关键物料属性',
    },
  },
  categoryLv: {
    label: '品类',
    field: 'categoryLv3Id',
    componentName: 'categoryName',
    componentProps: {
      title: '品类名称',
      type: 'categoryName',
      labelName: 'categoryName',
      valueName: 'id',
    },
  },
  figureNumber: {
    label: '图号',
    field: 'figureNumber',
    componentName: 'inputModal',
    componentProps: {
      tltle: '图号',
      type: 'materialCode',
      labelName: 'figureNumber',
      valueName: 'figureNumber',
    },
  },
  createTime: {
    label: '创建时间',
    field: 'createTime',
    componentName: 'rangPicker',
    formItemProps: {
      style: 'width: 595px !important',
    },
    componentProps: {
      allowClear: 'true',
    },
  },
  updateTime: {
    label: '最后修改时间',
    field: 'updateTime',
    componentName: 'rangPicker',
    formItemProps: {
      style: 'width: 595px !important',
    },
    componentProps: {
      allowClear: 'true',
    },
  },
  updater: {
    label: '最后修改人',
    field: 'updater',
    componentName: 'searchItemUser',
    componentProps: {
      placeholder: '请输入最后修改人',
    },
  },
  modelMark: {
    label: '型号',
    field: 'modelMark',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入型号',
    },
  },
  parentModel: {
    label: '父型号',
    field: 'parentModel',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入父型号',
    },
  },
  itemCode: {
    label: '物品码',
    field: 'itemCode',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入物品码',
    },
  },
  isContainsSensitiveInformation: {
    label: '是否包含敏感信息',
    field: 'isContainsSensitiveInformation',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'whether',
    },
  },
  supplierCode: {
    label: '供应商编码',
    field: 'supplierCode',
    componentName: 'inputModal',
    componentProps: {
      tltle: '供应商编号',
      type: 'supplyName',
      labelName: 'supplierCode',
      valueName: 'supplierCode',
    },
  },
  supplierName: {
    label: '供应商名称',
    field: 'supplierName',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入供应商名称',
    },
  },
  orderingPolicy: {
    label: '订货策略',
    field: 'orderingPolicy',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'orderingPolicy',
      placeholder: '请输入订货策略',
    },
  },
  maxPurchaseVolume: {
    label: '最大采购批量',
    field: 'maxPurchaseVolume',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入最大采购批量',
    },
  },
  procurementPreparationCycle: {
    label: '采购准备周期',
    field: 'procurementPreparationCycle',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入采购准备周期',
    },
  },
  blankingRate: {
    label: '下料利用率（%）',
    field: 'blankingRate',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入下料利用率',
    },
  },
  purchaseLeadTime: {
    label: '采购提前期',
    field: 'purchaseLeadTime',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入采购提前期',
    },
  },
  inspectionConsumptionRate: {
    label: '检验消耗率（%）',
    field: 'inspectionConsumptionRate',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入检验消耗率',
    },
  },
  safetyLeadTime: {
    label: '安全提前期',
    field: 'safetyLeadTime',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入安全提前期',
    },
  },
  arrivalReceivingCycle: {
    label: '到货接收周期',
    field: 'arrivalReceivingCycle',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入到货接收周期',
    },
  },
  inspectionCycle: {
    label: '检验周期',
    field: 'inspectionCycle',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入检验周期',
    },
  },
  checkType: {
    label: '检验类型',
    field: 'checkType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'inspectionType',
      placeholder: '请输入检验类型',
    },
  },
  minOrderQuantity: {
    label: '最小订货量',
    field: 'minOrderQuantity',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入最小订货量',
    },
  },
  quotientSelectionStrategy: {
    label: '选商策略',
    field: 'quotientSelectionStrategy',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'businessSelectionStrategy',
      placeholder: '请输入选商策略',
    },
  },
  orderPoint: {
    label: '订货点',
    field: 'orderPoint',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入订货点',
    },
  },
  categoryLv3: {
    label: '三级品类',
    field: 'categoryLv3',
    componentName: 'categoryName',
    componentProps: {
      title: '品类名称',
      type: 'categoryName',
      labelName: 'categoryName',
      valueName: 'categoryName',
    },
  },
  categoryLv1: {
    label: '一级品类',
    field: 'categoryLv1',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入一级品类',
      disabled: true,
    },
  },
  categoryLv2: {
    label: '二级品类',
    field: 'categoryLv2',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入二级品类',
      disabled: true,
    },
  },
  isPhysicochemicalExperiment: {
    label: '是否理化试验',
    field: 'isPhysicochemicalExperiment',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'whether',
    },
  },
  isNondestructiveTesting: {
    label: '是否无损检测',
    field: 'isNondestructiveTesting',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'whether',
    },
  },
  batch: {
    label: '批量',
    field: 'batch',
    componentName: 'input',
    componentProps: {
      placeholder: '请输入批量',
    },
  },
  batchPolicy: {
    label: '批量方针',
    field: 'batchPolicy',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'batchPolicy',
    },
  },
  measurementMark: {
    label: '计量标志',
    field: 'measurementMark',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'whether',
    },
  },
  accountingYear: {
    label: '会计年度',
    field: 'accountingYear',
    componentName: 'yearPicker',
    componentProps: {
      placeholder: '请输入会计年度',
    },
  },
};
